package com.wx.chapter8.homework05;

/**
 * ClassName:Teacher
 * Package :com.wx.chapter8.homework05
 * Description :
 *
 * @Author : coder_mu
 * @Create : 2023/5/29 - 16:17
 */
public class Teacher extends Employee {
    //教师特有属性
    private int classDays;//一年上课的天数
    private double classSal;//课时费

    @Override
    public void printSal() {
        System.out.println("教师");
        System.out.println(getName() + " 年工资是: "
                + (getSal() * getSalMonth() + classDays * classSal));
    }

    public Teacher(String name, double sal, int salMonth) {
        super(name, sal, salMonth);
    }

    public Teacher(String name, double sal, int salMonth, int classDays, double classSal) {
        super(name, sal, salMonth);
        this.classDays = classDays;
        this.classSal = classSal;
    }

    public int getClassDays() {
        return classDays;
    }

    public void setClassDays(int classDays) {
        this.classDays = classDays;
    }

    public double getClassSal() {
        return classSal;
    }

    public void setClassSal(double classSal) {
        this.classSal = classSal;
    }
}
